home *** CD-ROM | disk | FTP | other *** search
/ Computer Arts Interactive 4 / CARTS4.iso / mac / MiniCad 6.0.1 demo / MiniCad 6.0.1 Demo / MiniCad 6.0.1 Demo.rsrc / TEXT_1_old EPS Out Header.txt < prev    next >
Text File  |  1996-03-22  |  5KB  |  256 lines

  1. /_mcdict where {pop} {/_mcdict 60 dict def} ifelse
  2. _mcdict begin
  3.  
  4. % Basic Definitions
  5. /gs {gsave} def
  6. /gr {grestore} def
  7. /t {translate} def
  8. /sc {scale} def
  9. /sg {setgray} def
  10. /srgb {setrgbcolor} def
  11. /ff {findfont} def
  12. /mf {makefont} def
  13. /sf {setfont} def
  14. /slw {setlinewidth} def
  15. /str {stroke} def
  16. /slc {setlinecap} def
  17.  
  18. % Polyline operators
  19. /pl                % x y pl x y
  20. {
  21. transform
  22. 0.25 sub round 0.25 add exch
  23. 0.25 sub round 0.25 add exch
  24. itransform
  25. } def
  26. /setstrokeadjust where
  27.     {
  28.     pop true setstrokeadjust
  29.     /c                % x1 y1 x2 y2 x3 y3 c -
  30.     {curveto} def
  31.     /C /c load def
  32.     /v                % x2 y2 x3 y3 v -
  33.     {currentpoint 6 2 roll curveto} def
  34.     /V /v load def
  35.     /y                % x1 y1 x2 y2 y -
  36.     {2 copy curveto} def
  37.     /Y /y load def
  38.     /l                % x y l -
  39.     {lineto} def
  40.     /L /l load def
  41.     /m                % x y m -
  42.     {moveto} def
  43.     /dot
  44.     {currentpoint transform exch 1 add exch itransform lineto} def
  45.     }
  46.     {%else
  47.     /c
  48.     {pl curveto} def
  49.     /C /c load def
  50.     /v
  51.     {currentpoint 6 2 roll pl curveto} def
  52.     /V /v load def
  53.     /y
  54.     {pl 2 copy curveto} def
  55.     /Y /y load def
  56.     /l
  57.     {pl lineto} def
  58.     /L /l load def
  59.     /m
  60.     {pl moveto} def
  61.     /dot
  62.     {currentpoint transform exch 1 add exch itransform lineto} def
  63. }ifelse
  64.  
  65. % Rectangle: left top right bottom R -
  66. /rectangleDict 4 dict def
  67. /R
  68.     {rectangleDict begin
  69.         /bottom exch def
  70.         /right exch def
  71.         /top exch def
  72.         /left exch def
  73.         right bottom m
  74.         right top L
  75.         left top L
  76.         left bottom L
  77.         right bottom L
  78.         closepath
  79.     end}
  80. bind def
  81.  
  82. % Oval: left top right bottom OV -
  83. /ovalDict 10 dict def
  84. /OV
  85.     {ovalDict begin
  86.         /bottom exch def 
  87.         /right exch def
  88.         /top exch def
  89.         /left exch def
  90.         /yrad bottom top sub 2 div def
  91.         /xrad right left sub 2 div def
  92.         /y yrad top add def
  93.         /x xrad left add def
  94.         x y t xrad yrad sc
  95.         newpath 0 0 1 0 360 arc closepath
  96.         1 xrad div 1 yrad div sc    % Reverse scaling.
  97.     end}
  98. bind def
  99.  
  100. % Rounded Rectangle: left top right bottom ovalwidth ovalheight RR -
  101. /rRectangleDict 10 dict def
  102. /RR {
  103.     rRectangleDict begin
  104.     2 div /hvy exch def
  105.     2 div /hvx exch def
  106.     /bottom exch def
  107.     /right exch def
  108.     /top exch def
  109.     /left exch def
  110.     /nleft hvx left add hvx div def
  111.     /ntop hvy top add hvy div def
  112.     /nright right hvx sub hvx div def
  113.     /nbottom bottom hvy sub hvy div def
  114.     hvx hvy sc
  115.     newpath
  116.     nright nbottom 1 90 0 arcn
  117.     nright ntop 1 360 270 arcn
  118.     nleft ntop 1 270 180 arcn
  119.     nleft nbottom 1 180 90 arcn
  120.     closepath
  121.     1 hvx div 1 hvy div sc
  122.     end
  123. }
  124. bind def
  125.  
  126. % Arc: left top right bottom startangle endangle A -
  127. /arcDict 12 dict def
  128. /A {
  129.     arcDict begin
  130.     /endangle exch def
  131.     /startangle exch def
  132.     /bottom exch def
  133.     /right exch def
  134.     /top exch def
  135.     /left exch def
  136.     /yrad bottom top sub 2 div def
  137.     /y yrad top add def
  138.     /xrad right left sub 2 div def
  139.     /x xrad left add def
  140.     x y t xrad yrad neg sc
  141.     0 0 1 startangle endangle arc
  142.     1 xrad div 1 yrad neg div sc    % Reverse scaling.
  143.     end
  144. }
  145. bind def
  146.  
  147. % Polygon: xn yn ... x1 y1 n-1 P -
  148. /polyDict 1 dict def
  149. /P {
  150.     polyDict begin
  151.     /numOfPoints exch def
  152.     m numOfPoints {L} repeat
  153.     end
  154. }
  155. bind def
  156.  
  157. % Pattern fill: fR fG fB bR bG bB [p0 ... p7] patfill -
  158. /fillDict 11 dict def
  159. /patfill {
  160.     fillDict begin
  161.     gs
  162.     /fa exch def                % Grab pattern.
  163.     srgb                        % Set background color.
  164.     17.3611 17.3611 sc        % Scale back to 72 dpi from 1250.
  165.     flattenpath pathbbox        % Get path bounding box.
  166.     /ury exch def
  167.     /urx exch def
  168.     /lly exch def
  169.     /llx exch def            % Get edges.
  170.     clip
  171.     newpath
  172.     llx lly m
  173.     llx ury L
  174.     urx ury L
  175.     urx lly L
  176.     closepath fill            % Fill in background color.
  177.     srgb                        % Set foreground color.
  178.     /w urx llx sub ceiling cvi def
  179.     /h ury lly sub ceiling cvi def
  180.     /bytes w 8 div ceiling cvi def
  181.     /patstr bytes 8 mul string def
  182.     /row 0 def
  183.     /patproc {
  184.         0 1 7 {
  185.             /row exch def
  186.             row bytes mul 1 row 1 add bytes mul 1 sub
  187.             {patstr exch fa row 8 mod get put} for
  188.         } for
  189.         patstr
  190.     } def
  191.     llx lly t
  192.     w h sc
  193.     w h true [w 0 0 h 0 0] patproc imagemask
  194.     gr
  195.     end
  196. }
  197. bind def
  198.  
  199. % Outline string show: string olshow -
  200. /outlinedict 1 dict def
  201. /olshow {
  202.     outlinedict begin
  203.     /cs 1 string def
  204.     {
  205.         cs 0 3 -1 roll put    % Stuff the char into the string cs.
  206.         gs 1 sg cs show gr    % Paint the char white and move back.
  207.         cs true charpath
  208.         currentpoint str m    % Draw char outline.
  209.     } forall
  210.     end
  211. }
  212. bind def
  213.  
  214. % Shadow string show: string shadow-x shadow-y shshow -
  215. /shadowdict 3 dict def
  216. /shshow {
  217.     shadowdict begin
  218.     /shady exch def
  219.     /shadx exch def
  220.     /cs 1 string def
  221.     {
  222.         cs 0 3 -1 roll put    % Stuff the char into the string cs.
  223.         currentpoint
  224.         shadx shady rmoveto    % Draw shadow.
  225.         cs show m
  226.         gs 1 sg cs show gr    % Paint char white.
  227.         cs true charpath
  228.         currentpoint str m    % Draw char outline.
  229.         shadx 0 rmoveto        % Move to next char position.
  230.     } forall
  231.     end
  232. }
  233. bind def
  234.  
  235. % Text Encoding Procedure
  236. /Z                    % array literal literal direction Z -
  237. {
  238. pop
  239. findfont begin
  240. currentdict dup length 1 add dict begin
  241. {1 index /FID ne {def} {pop pop} ifelse} forall
  242. /FontName exch def dup length 0 ne
  243. {
  244.     /Encoding Encoding 256 array copy def
  245.     0 exch
  246.     {
  247.         dup type /nametype eq
  248.         {Encoding 2 index 2 index put pop 1 add}
  249.         {exch pop} ifelse
  250.     } forall
  251. } if pop
  252. currentdict dup end end
  253. /FontName get exch definefont pop
  254. } def
  255. %%EndProlog
  256.